<? 
include('header_html.php');
$devices = $nms->getDevices(array('status'=>'down','disabled'=>0));
?>
<div id="body" class="<?=empty($devices)?'allonline':''?>"><? 
	if (empty($devices)) {
		echo '<img src="img/thumbs_up.png"/>';
		echo '<div>It\'s All Good!!!</div>';
		//echo '<div class="time">Time since last Issue:<b>'.$nms->format_uptime(rand(10000,999999)).'</b></div>';
	} else {	
		foreach ($devices AS $device) {
			echo '<div id="deviceInfo">';
			echo '	<div class="header">';
			echo '		<img src="/img/device/'.$device->os->getType().'.png" class="icon"  />';
			echo '		<b>'.$device->description.'</b>';
			echo '		<span>'.$device->getHostName().'</span>';
			echo '	</div>';
			if ($device->isUp()) {
				echo '<div class="status up">Online <span>'.$device->getUptime().'</span></div>';
			} else {
				echo '<div class="status down">Offline <span class="alerts">0</span></div>';
			}
			echo '</div>';
		}	
	}
?></div>
<? include('footer_html.php'); ?>